﻿/**
 *
 * @file VAOneXMLAdaptorNCT.h
 * @brief VAOne读写适配器声学包
 * @author liuzhiyuan(liuzhiyuan@diso.com)
 * @date 2024-10-18
 *
 */
#ifndef VAONEXMLADAPTORNCT_H
#define VAONEXMLADAPTORNCT_H

#include "FITKVAOneXMLIOAPI.h"
#include "FITKAbstractVAOneXMLAdaptor.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"
#include "rapidxml.hpp"

namespace Acoustics
{
    class FITKAcousticsNCTManager;
}

namespace IO
{
    /**
     * @brief   VAOne读写适配器声包
     * @author  liuzhiyuan(liuzhiyuan@diso.com)
     * @data    2024-10-16
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorNCT : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorNCT);
    public:

        /**
         * @brief   构造函数
         * @author  liuzhiyuan(liuzhiyuan@diso.com)
         * @date    2024-11-7
         */
         explicit VAOneXMLAdaptorNCT()= default;
        /**
         * @brief   析构函数
         * @author  liuzhiyuan(liuzhiyuan@diso.com)
         * @date    2024-11-7
         */
         ~VAOneXMLAdaptorNCT() = default;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.com)
         * @date    2024-10-22
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.com)
         * @date    2024-10-22
         */
        bool adaptW() override;

    private:
        /**
         * @brief 读取多层声包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool readNCTLayUp();
        /**
         * @brief 写入多层声包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool writeNCTLayUp();

        /**
         * @brief 读取自定义声学包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool readUserDefined();
        /**
         * @brief 写入多层声包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool writeUserDefined();

        /**
         * @brief 读取多重声学包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool readMultipleNoise();
        /**
         * @brief 写入多重声学包xml
         * @return bool 读取是否成功
         * @author liuzhiyuan(liuzhiyuan@diso.com)
         * @date 2024-10-17
         */
        bool writeMultipleNoise();

        Acoustics::FITKAcousticsNCTManager* _acousticsPhysicsPropManager{};

    };
    Register2FITKIOAdaptorFactory(VAOneXML, Acoustics::FITKAcousticsNCTManager, VAOneXMLAdaptorNCT)
}

#endif // VAONEXMLADAPTORNCT_H
